package yun.web.activerecord;


import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;

/**
 * LogKit.
 */
public class LogKit {

    private static class Holder {
        private static Log log = LogFactory.get(LogKit.class);
    }

    /**
     * Do nothing.
     */
    public static void logNothing(Throwable t) {

    }

    public static void debug(String message) {
        Holder.log.debug(message);
    }

    public static void debug(String message, Throwable t) {
        Holder.log.debug(message, t);
    }

    public static void info(String message) {
        Holder.log.info(message);
    }

    public static void info(String message, Throwable t) {
        Holder.log.info(message, t);
    }

    public static void warn(String message) {
        Holder.log.warn(message);
    }

    public static void warn(String message, Throwable t) {
        Holder.log.warn(message, t);
    }

    public static void error(String message) {
        Holder.log.error(message);
    }

    public static void error(String message, Throwable t) {
        Holder.log.error(message, t);
    }


    public static boolean isDebugEnabled() {
        return Holder.log.isDebugEnabled();
    }

    public static boolean isInfoEnabled() {
        return Holder.log.isInfoEnabled();
    }

    public static boolean isWarnEnabled() {
        return Holder.log.isWarnEnabled();
    }

    public static boolean isErrorEnabled() {
        return Holder.log.isErrorEnabled();
    }

}

